//
//  ViewController.m
//  11--Xib CustomCell
//
//  Created by 冀永金 on 16/7/28.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "ViewController.h"
#import "NewsTableviewCell.h"
@interface ViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *newsTableView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    // 自定义tableViewCell
    // 创建cell时， 勾选 Also  create xib File
    // 2.在xib文件中 ,进行cell布局
    [_newsTableView registerNib:[UINib nibWithNibName:@"NewsTableviewCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"pool"];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
   NewsTableviewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"pool" forIndexPath:indexPath];
    
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 94;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
